<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<div class="t_bar">
	科技企业孵化器现有工作人员一览表
</div>
<table  id="tblMileStones" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<thead >
		<tr style="organization_finances/financeborder:1px solid #B7D1E6">
			<th class="TblHead" align="center"  width="5%">序号</th>
			<th class="TblHead" align="center"  width="10%">姓名</th>
			<th class="TblHead" align="center"  width="10%">性别</th> 
			<th class="TblHead" align="center"  width="10%">年龄</th> 
			<th class="TblHead" align="center"  width="15%">职务</th>
			<th class="TblHead" align="center"  width="20%">职称</th>
			<th class="TblHead" align="center" width="13%">学历</th>
			<th class="TblHead" align="center" width="12%">专业领域</th>						
		</tr>
	</thead>
	<tbody id="tab">
		
		<c:set value="0" var="index" scope="page"/>
		<x:forEach select="$xmlData/data/milestones/milestone" var="milestone">
		<c:choose>
			<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
			<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
		</c:choose>
		<tr >
			<td align="center">
				<x:out select="$milestone/@seq_no"/>
			</td>
			<td align="center" valign="top">
				<x:out select="$milestone/content1"/> 
			</td>
			<td align="center">
				<x:out select="$milestone/sex_name"/>
			</td>
			<td align="center">
				<x:out select="$milestone/content3"/>
			</td>
			<td align="center">
				<x:out select="$milestone/content4"/>
			</td>
			<td align="center">
				<x:out select="$milestone/prof_title_name" />
			</td>
			<td align="center">						
			   <x:out select="$milestone/educate_name" />
			</td>
			<td align="center">
				<x:out select="$milestone/content5"/>
			</td>
		</tr>
		<c:set value="${index+1}" var="index" scope="page"/>
		</x:forEach>
		<script type="text/javascript">
			showAllDateTag("tblMileStones");
		</script>
	</tbody>
</table>
<br/>


<div class="t_bar">
	科技企业孵化器现有孵化场地情况表
</div>
<table  id="tblAttendOrg" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<thead >
		<tr style="organization_finances/financeborder:1px solid #B7D1E6">
			
			<th class="TblHead" align="center" rowspan="2" width="5%">序号</th>
			<th class="TblHead" align="center" rowspan="2" width="10%">楼宇名称</th>
			<th class="TblHead" align="center" rowspan="2" width="20%">详细地址</th> 
			<th class="TblHead" align="center" rowspan="2" width="10%">启用时间</th> 
			<th class="TblHead" align="center" rowspan="2" width="10%">面积<br/>(平方米)</th>
			<th class="TblHead" align="center" colspan="4" width="20%">其中 (平方米)</th>
			<th class="TblHead" align="center" colspan="4" width="20%">产权情况（平方米）</th>						
		</tr>
		<tr>
			<th class="TblHead" align="center" width="5%">企业用</th>
			<th class="TblHead" align="center" width="5%">服务用</th>
			<th class="TblHead" align="center" width="5%">办公用</th>
			<th class="TblHead" align="center" width="5%">其它</th>
			<th class="TblHead" align="center" width="5%">自由<br/>产权</th>
			<th class="TblHead" align="center" width="5%">受托<br/>管理</th>
			<th class="TblHead" align="center" width="5%">租赁</th>
			<th class="TblHead" align="center" width="5%">其它</th>
		</tr>
	</thead>
	<tbody id="tab">
		
		<c:set value="0" var="index" scope="page"/>
		<x:forEach select="$xmlData/data/milestones/milestone1" var="milestone1">
		
		<c:choose>
			<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
			<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
		</c:choose>
		<tr >
			
			<td align="center">
				<span name="milestones/milestone1[${flag}${index}]@seq_no" ><x:out select="$milestone1/@seq_no"/></span> 
			</td>
			<td align="center" valign="top">
				<span label="楼宇名称" name="milestones/milestone1[${flag}${index}]/content1"><x:out select="$milestone1/content1"/></span>
			</td>
			<td align="center" valign="top">
				<span label="详细地址" name="milestones/milestone1[${flag}${index}]/content2"><x:out select="$milestone1/content2"/></span>
			</td>
			<td align="center">
				<span  label="启用时间"  name="milestones/milestone1[${flag}${index}]/begain_date" ><x:out select="$milestone1/begain_date" /></span>
			</td>
			<td align="center">
				<span label="面积" name="milestones/milestone1[${flag}${index}]/content3" ><x:out select="$milestone1/content3"/></span>
			</td>
			<td align="center">
				<span label="其中 (平方米)-->企业用" name="milestones/milestone1[${flag}${index}]/content4" ><x:out select="$milestone1/content4"/></span>
			</td>
			<td align="center">
				<span label="其中 (平方米)-->服务用" name="milestones/milestone1[${flag}${index}]/content5" ><x:out select="$milestone1/content5"/></span>
			</td>
			<td align="center">
				<span label="其中 (平方米)-->办公用" name="milestones/milestone1[${flag}${index}]/content6" ><x:out select="$milestone1/content6"/></span>
			</td>
			<td align="center">
				<span label="其中 (平方米)-->其它" name="milestones/milestone1[${flag}${index}]/content7" ><x:out select="$milestone1/content7"/></span>
			</td>
			<td align="center">
				<span label="产权情况（平方米）-->自由产权" name="milestones/milestone1[${flag}${index}]/content8" ><x:out select="$milestone1/content8"/></span>
			</td>
			<td align="center">
				<span label="产权情况（平方米）-->受托管理" name="milestones/milestone1[${flag}${index}]/content9" ><x:out select="$milestone1/content9"/></span>
			</td>
			<td align="center">
				<span  label="产权情况（平方米）-->租赁" name="milestones/milestone1[${flag}${index}]/content10" ><x:out select="$milestone1/content10"/></span>
			</td>
			<td align="center">
				<span  label="产权情况（平方米）-->其它" name="milestones/milestone1[${flag}${index}]/content11" ><x:out select="$milestone1/content11"/></span>
			</td>
		</tr>

		<c:set value="${index+1}" var="index" scope="page"/>
		</x:forEach>
	</tbody>
	<tr>
		<th class="TblHead" align="center"  colspan="2">合计</th>
		<th class="TblHead" align="center"  >/</th>
		<th class="TblHead" align="center"  >/</th> 
		
		<th class="TblHead" align="center"  ><span id="total_a" name="milestones/total_a"><x:out select="$xmlData/data/milestones/total_a"/></span></th>
		<th class="TblHead" align="center"  ><span id="total_b" name="milestones/total_b"><x:out select="$xmlData/data/milestones/total_b"/></span></th>
		<th class="TblHead" align="center"  ><span id="total_c" name="milestones/total_c"><x:out select="$xmlData/data/milestones/total_c"/></span></th>
		<th class="TblHead" align="center"  ><span id="total_d" name="milestones/total_d"><x:out select="$xmlData/data/milestones/total_d"/></span></th>
		<th class="TblHead" align="center"  ><span id="total_e" name="milestones/total_e"><x:out select="$xmlData/data/milestones/total_e"/></span></th>
		<th class="TblHead" align="center"  ><span id="total_f" name="milestones/total_f"><x:out select="$xmlData/data/milestones/total_f"/></span></th>
		<th class="TblHead" align="center"  ><span id="total_g" name="milestones/total_g"><x:out select="$xmlData/data/milestones/total_g"/></span></th> 
		<th class="TblHead" align="center"  ><span id="total_h" name="milestones/total_h"><x:out select="$xmlData/data/milestones/total_h"/></span></th>
		<th class="TblHead" align="center"  ><span id="total_i" name="milestones/total_i"><x:out select="$xmlData/data/milestones/total_i"/></span></th>
		</tr>

</table>
<br/>

	


	<br/>
<script type="text/javascript">
$(function() {
	$("#tblMileStones tr:even").addClass("li_2");
	$("#tblMileStones tr:odd").addClass("li_1");
});

function initTreeValue2(treeId, treeNode) {
  	//针对单位性质
  	if (( treeNode && treeNode.isParent)) {
		scmWarn("请选择具体的"+$("#" + treeId).attr("label"));
			$("#" + treeId).val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId.substr(0,treeId.lastIndexOf("_")) + "_code'],[id$='" + treeId.substr(0,treeId.lastIndexOf("_")) + "_code']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId.substr(0,treeId.lastIndexOf("_")) + "_value'],[id$='" + treeId.substr(0,treeId.lastIndexOf("_")) + "_value']").val("");
			$("#" + treeId).parents("td").find("[name$='" + treeId.substr(0,treeId.lastIndexOf("_")) + "_name'],[id$='" + treeId.substr(0,treeId.lastIndexOf("_")) + "_name']").val("");
			return false;
	}
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			//str = obj.name + "-" + str;
			obj = obj.parentNode;
		}
		$("#" + treeId).parents("td").find("[name$='" +  treeId.substr(0,treeId.lastIndexOf("_")) + "_code'],[id$='" + treeId.substr(0,treeId.lastIndexOf("_")) + "_code']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" +  treeId.substr(0,treeId.lastIndexOf("_")) + "_value'],[id$='" + treeId.substr(0,treeId.lastIndexOf("_")) + "_value']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" +  treeId.substr(0,treeId.lastIndexOf("_")) + "_name'],[id$='" + treeId.substr(0,treeId.lastIndexOf("_")) + "_name']").val(str);
		$("#" + treeId).val(str);
		initTreeValue2CallBack();
	}
function setRadioSelectedValue(val,targetId,text){
	document.getElementById(targetId+"_name").value = text;
}


   function deleteSelectedRow2(tableId,message,nummin,warnMsg,selName){
		if(!selName)selName="";
		var tr=$("#"+tableId+" :radio[name*='"+selName+"']:checked").parents("tr");
		if(nummin==null)
			nummin=0;
		var length=tr.length;
		if(tr.length==0)
			tr=$("#"+tableId+" tr").filter(":last");
		else if(tr.length>1)
			tr=tr.first();

		if(tr.get(0).rowIndex-1==nummin){
			scmWarn(irisNotes.delWarn1);
			return false;
		}
		if(length==0){
			
				scmWarn(irisNotes.delWarn2);
			
			return false;
		}
		  if(!confirm(messageTip.deleteTip+message+"？"))
			  return false;
		  tr.remove();
		  refreshRowINdex2(tableId);
		  return true;
	}
   function refreshRowINdex2(tblId){
		 //重新计算行号

		
		  $("#"+tblId+" tr").each(function(){
			  
			   var seq=$(this).get(0).rowIndex;//获得行数
			   if(seq>2){//如果有行  显示时display行不计入类，故只减1
				   
				   seq=seq-2;
				   var seq_no=$(this).find("[name$='seq_no']");
				   if(seq_no.is("span"))
					   seq_no.html(seq);
				   else
					   seq_no.val(seq);
				   
				   seq=""+(seq-1);
				   if(seq.length==1)
					   seq="0"+seq;
				  //替换相应的name参数的seq
				  $(this).find("input,span,textarea,select").each(function(){
					   var name=$(this).attr("name");
					   if(name!=null&&name!=""){
						   name=name.replace(/\[\d*\]/g,"["+seq+"]");
						   $(this).attr("name",name);
					   }
					   var id=$(this).attr("id");
					   if(id!=null&&id!=""){
						   id=id.replace(/\[\d*\]/g,"["+seq+"]");
						   $(this).attr("id",id);
						   id=id.replace(/\d+/g,""+seq+"");
						   $(this).attr("id",id);
					   }
					   var className=$(this).attr("class");
					   if(className!=null&&className!=""){
						   className=className.replace(/\[\d*\]/g,"["+seq+"]");
						   $(this).attr("class",className);
					   }
				   });
			   }
			 }
		  );

	}
   /**
    * 上移行
    * @param tblId
    * @returns {Boolean}
    */
   function movePrev2(tblId,selName) {

   	if (!selName)
   		selName = "";
   	if ($("#" + tblId + " :radio[name*='" + selName + "']:checked").length == 0) {
   		scmWarn(irisNotes.prevWarn);
   		return false;
   	}
   	if ($("#" + tblId + " tr").length <= 3)
   		return false;
   	var trChecked = $("#" + tblId + " :radio[name*='" + selName + "']:checked")
   			.parents("tr").first();// 取得被选中的行
   	var trPrev = trChecked.prev();// 取得上一行
   	var index = trChecked.get(0).rowIndex;// 获得行号
   	if (index <= 3) {// 如果是第一行
   		scmWarn(irisNotes.tabelMoveWarn1);
   		return false;
   	}
   	//trChecked.remove();
   	trPrev.before(trChecked);
   	trChecked.find(":radio[name*='" + selName + "']").attr("checked", 'true');
   	refreshRowINdex2(tblId);
   }

   /**
    * 下移行
    * @param tblId
    * @returns {Boolean}
    */
   function moveNext2(tblId,selName) {
   	if (!selName)
   		selName = "";
   	if ($("#" + tblId + " :radio[name*='" + selName + "']:checked").length == 0) {
   		scmWarn(irisNotes.nextWarn);
   		return false;
   	}
   	if ($("#" + tblId + " tr").length <= 3) {
   		return false;
   	}
   	var trChecked = $("#" + tblId + " :radio[name*='" + selName + "']:checked")
   			.parents("tr").first();// 取得被选中的行
   	var trNext = trChecked.next();
   	var index = trChecked.get(0).rowIndex;// 获得行号
   	if (index == $("#" + tblId + " tr").length - 1) {// 如果是第一行
   		scmWarn(irisNotes.tabelMoveWarn2);
   		return false;
   	}
   	//trChecked.remove();
   	trNext.after(trChecked);
   	trChecked.find(":radio[name*='" + selName + "']").attr("checked", "true");
   	refreshRowINdex2(tblId);
   }



</script>